blob: a8d489f9f29034d732a67375b617f3315109aa05 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-rev-list(1)
2===============
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
Junio C Hamano235a91e2006-01-07 01:13:5811[verse]
Junio C Hamano1a4e8412005-12-27 08:17:2312'git-rev-list' [ \--max-count=number ]
Junio C Hamano17bbaca2006-12-25 11:36:3113 [ \--skip=number ]
Junio C Hamano235a91e2006-01-07 01:13:5814 [ \--max-age=timestamp ]
15 [ \--min-age=timestamp ]
16 [ \--sparse ]
17 [ \--no-merges ]
Junio C Hamano554da792007-12-27 03:29:5818 [ \--first-parent ]
Junio C Hamano9be18972006-01-28 08:54:5719 [ \--remove-empty ]
Junio C Hamanoee695f22007-06-21 00:35:3620 [ \--full-history ]
Junio C Hamano872c5682006-07-07 06:05:4021 [ \--not ]
Junio C Hamano235a91e2006-01-07 01:13:5822 [ \--all ]
Junio C Hamanoc9245d92006-09-06 09:35:4623 [ \--stdin ]
Junio C Hamano8c5802d2007-11-15 00:13:3624 [ \--quiet ]
Junio C Hamanodecf50e2006-03-05 10:51:1425 [ \--topo-order ]
Junio C Hamano235a91e2006-01-07 01:13:5826 [ \--parents ]
Junio C Hamanoee695f22007-06-21 00:35:3627 [ \--timestamp ]
Junio C Hamano5678d692007-04-06 00:51:4328 [ \--left-right ]
Junio C Hamanod9e0e5d2007-04-14 16:22:0429 [ \--cherry-pick ]
Junio C Hamano775a0f42006-12-31 01:19:1430 [ \--encoding[=<encoding>] ]
Junio C Hamano47c1e3c2006-09-25 04:45:5531 [ \--(author|committer|grep)=<pattern> ]
Junio C Hamanode9879a2007-07-22 09:33:4232 [ \--regexp-ignore-case | \-i ]
33 [ \--extended-regexp | \-E ]
Junio C Hamano24bc09a2008-02-28 00:27:4434 [ \--fixed-strings | \-F ]
Junio C Hamano02f130b2007-07-14 08:26:5635 [ \--date={local|relative|default|iso|rfc|short} ]
Junio C Hamano5f327762006-03-02 09:14:5136 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
Junio C Hamano235a91e2006-01-07 01:13:5837 [ \--pretty | \--header ]
38 [ \--bisect ]
Junio C Hamano20f64da2007-04-04 18:38:3039 [ \--bisect-vars ]
Junio C Hamano1974bf22007-10-31 05:57:2040 [ \--bisect-all ]
Junio C Hamano859f3b42006-08-04 10:04:3041 [ \--merge ]
Junio C Hamano053827f2007-02-14 07:23:5842 [ \--reverse ]
Junio C Hamanodb450ba2007-01-21 08:57:1443 [ \--walk-reflogs ]
Junio C Hamanoa196f6d2007-07-24 08:10:2744 [ \--no-walk ] [ \--do-walk ]
Junio C Hamano235a91e2006-01-07 01:13:5845 <commit>... [ \-- <paths>... ]
Junio C Hamano1a4e8412005-12-27 08:17:2346
47DESCRIPTION
48-----------
Junio C Hamano89e135d2006-09-03 06:18:2549
Junio C Hamano1a4e8412005-12-27 08:17:2350Lists commit objects in reverse chronological order starting at the
51given commit(s), taking ancestry relationship into account. This is
52useful to produce human-readable log output.
53
Junio C Hamano89e135d2006-09-03 06:18:2554Commits which are stated with a preceding '{caret}' cause listing to
55stop at that point. Their parents are implied. Thus the following
56command:
57
58-----------------------------------------------------------------------
59$ git-rev-list foo bar ^baz
60-----------------------------------------------------------------------
61
Junio C Hamano1a4e8412005-12-27 08:17:2362means "list all the commits which are included in 'foo' and 'bar', but
63not in 'baz'".
64
Junio C Hamano89e135d2006-09-03 06:18:2565A special notation "'<commit1>'..'<commit2>'" can be used as a
66short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
67the following may be used interchangeably:
Junio C Hamano1a4e8412005-12-27 08:17:2368
Junio C Hamano89e135d2006-09-03 06:18:2569-----------------------------------------------------------------------
70$ git-rev-list origin..HEAD
71$ git-rev-list HEAD ^origin
72-----------------------------------------------------------------------
73
74Another special notation is "'<commit1>'...'<commit2>'" which is useful
75for merges. The resulting set of commits is the symmetric difference
Junio C Hamano872c5682006-07-07 06:05:4076between the two operands. The following two commands are equivalent:
77
Junio C Hamano89e135d2006-09-03 06:18:2578-----------------------------------------------------------------------
79$ git-rev-list A B --not $(git-merge-base --all A B)
80$ git-rev-list A...B
81-----------------------------------------------------------------------
82
Junio C Hamano35738e82008-01-07 07:55:4683linkgit:git-rev-list[1] is a very essential git program, since it
Junio C Hamano89e135d2006-09-03 06:18:2584provides the ability to build and traverse commit ancestry graphs. For
85this reason, it has a lot of different options that enables it to be
Junio C Hamano35738e82008-01-07 07:55:4686used by commands as different as linkgit:git-bisect[1] and
87linkgit:git-repack[1].
Junio C Hamano1a4e8412005-12-27 08:17:2388
89OPTIONS
90-------
Junio C Hamano89e135d2006-09-03 06:18:2591
Junio C Hamanob0e02952008-01-19 08:02:0092:git-rev-list: 1
93include::rev-list-options.txt[]
Junio C Hamano0430e3a2007-05-15 03:13:1794
95include::pretty-formats.txt[]
96
97
Junio C Hamano1a4e8412005-12-27 08:17:2398Author
99------
100Written by Linus Torvalds <torvalds@osdl.org>
101
Junio C Hamano1a4e8412005-12-27 08:17:23102Documentation
103--------------
Junio C Hamano89e135d2006-09-03 06:18:25104Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
105and the git-list <git@vger.kernel.org>.
Junio C Hamano1a4e8412005-12-27 08:17:23106
107GIT
108---
Junio C Hamano35738e82008-01-07 07:55:46109Part of the linkgit:git[7] suite